package spring.framework.context.support;

import cn.hutool.core.bean.BeanException;
import spring.framework.beans.BeansException;

/**
 * @author fun.pengzh
 * @class spring.framework.context.support.ClassPathXmlApplicationContext
 * @desc
 * @since 2021-10-10
 */
public class ClassPathXmlApplicationContext extends AbstractXmlApplicationContext {

    private String[] configLocations;

    public ClassPathXmlApplicationContext() {
    }

    public ClassPathXmlApplicationContext(String configlocations) throws BeansException {
        this(new String[]{configlocations});
    }

    public ClassPathXmlApplicationContext(String[] configLocations) throws BeanException {
        this.configLocations = configLocations;
        refresh();
    }

    @Override
    protected String[] getConfigLocations() {
        return configLocations;
    }

}
